<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="./CSS/signal_switch.css" />
<script type="text/javascript" src="./js/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
 var  inputvgavalue="";
 var   outputvgavalue="";
 var  inputavvalue="";
 var   outputavvalue="";
$(document).ready(function(){
/*$("input[type=button][name=confirm]").click(function(){
var json = $("input[type=radio][name=input]:checked").val();

 if(json ==undefined) 
	  {

	  alert("请选择输入信号");
	  return
	 }

var json2 = $("input[type=checkbox][name=output]:checked").val();
if(json2 ==undefined) 
	  {

	  alert("请选择输出信号");
	  return
	 }

var json3= " ";
$("input[type=checkbox][name=output]:checked").each(function(){
json3 += $(this).val()+" ";
})

alert("输入信号： "+json+"   输出信号:"+json3);


// 以下是发送到cgi
/* $.ajax({		  
type: get,		  
url: http://xx.xxx.xx.xx/cgi-bin/signal_switch.cgi,		 
data: "input="+json+"&"+"output="+json3,		  
success: function(msg){			 alert( "数据发送成功" + msg );		 
}		
}); 
});*/
$("input[type=button][name=inputvga]").click(function(){
     inputvgavalue = $(this).val();
	alert("输入信号： "+inputvgavalue+"  ");
});

$("input[type=button][name=outputvga]").click(function(){
    outputvgavalue = $(this).val();
	//alert(inputvalue);
	if(typeof(inputvgavalue) =="undefined") 
	  {

	  alert("请选择输入信号");
	  return
	 }
	alert("输入信号： "+inputvgavalue+"  "+"输出信号: "+outputvgavalue+" ");
	
	/* $.ajax({		  
        type: get,		  
       url: http://xx.xxx.xx.xx/cgi-bin/signal_switch.cgi,		 
       data: "input="+inputvgavalue+"&"+"output="+outputvgavalue,		  
       success: function(msg){			 alert( "数据发送成功" + msg );		 
}		
}); */
});

$("input[type=button][name=inputav]").click(function(){
     inputavvalue = $(this).val();
	alert("输入信号： "+inputavvalue+"  ");
});

$("input[type=button][name=outputav]").click(function(){
    outputavvalue = $(this).val();
	//alert(inputvalue);
	if(typeof(inputavvalue) =="undefined") 
	  {

	  alert("请选择输入信号");
	  return
	 }
	alert("输入信号： "+inputavvalue+"  "+"输出信号: "+outputavvalue+" ");
	
	/* $.ajax({		  
        type: get,		  
       url: http://xx.xxx.xx.xx/cgi-bin/signal_switch.cgi,		 
       data: "input="+inputavvalue+"&"+"output="+outputavvalue,		  
       success: function(msg){			 alert( "数据发送成功" + msg );		 
}		
}); */
});
});
</script>
</head>

<body>
<div><p id="text_area0">信号切换</p></div>
<div id="signal_switch">
<p id="text_area1">先选择输入信号，再选择输出信号</p>
<table id="input">
<caption>VGA切换</caption>
<tr>
<td>输<br />入</td>
<td><input class="input" name="inputvga" type="button" value="VGA1" /></td>
<td><input class="input" name="inputvga" type="button" value="VGA2" /></td>
<td><input class="input" name="inputvga" type="button" value="VGA3" /></td>
<td><input class="input" name="inputvga" type="button" value="VGA4" /></td>
</tr>
<tr>
<td>输<br />出</td>
<td><input class="output" name="outputvga" type="button" value="VGA1" /></td>
<td><input class="output" name="outputvga" type="button" value="VGA2" /></td>
<td><input class="output" name="outputvga" type="button" value="VGA3" /></td>
<td><input class="output" name="outputvga" type="button" value="VGA4" /></td>
</tr>
</table>
<table id="output">
<caption>AV切换</caption>
<tr>
<td>输<br />入</td>
<td><input class="input" name="inputav" type="button" value="AV1" /></td>
<td><input class="input" name="inputav" type="button" value="AV2" /></td>
<td><input class="input" name="inputav" type="button" value="AV3" /></td>
<td><input class="input" name="inputav" type="button" value="AV4" /></td>
</tr>
<tr>
<td>输<br />出</td>
<td><input class="output" name="outputav" type="button" value="AV1" /></td>
<td><input class="output" name="outputav" type="button" value="AV2" /></td>
<td><input class="output" name="outputav" type="button" value="AV3" /></td>
<td><input class="output" name="outputav" type="button" value="AV4" /></td>
</tr>
</table>
<div class="clear"></div>
<!--<div id="confirm"><input name="confirm" type="button" value="确认"/></div>-->
</div>
</body>
</html>
